package com.cq.service.Impl;

import com.cq.dao.EmployeeDao;
import com.cq.pojo.Employee;
import com.cq.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmployeeServiceImpl implements EmployeeService {

    private EmployeeDao employeeDao;

    @Autowired
    public void setEmployeeDao(EmployeeDao employeeDao) {
        this.employeeDao = employeeDao;
    }


    @Override
    public Employee queryOne(String Emp_Id) {
        Employee employee = employeeDao.employeeQueryById(Emp_Id);
        return employee;
    }

    @Override
    public int empUpdateSelf(Employee employee) {
        int result = employeeDao.empUpdateSelfById(employee);
        return result;
    }


//    @Override
//    public int updateOne(Employee employee) {
//        return employeeDao.updateEmp(employee);
//    }
}
